package com.yqy.spring.T1;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

public class Client {
    public static void main(String[] args) throws ClassNotFoundException, NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException {
        Class clazz= Class.forName("com.yqy.spring.T1.SystemService");
        Object obj = clazz.newInstance();
        Method loginMethod=clazz.getDeclaredMethod("login",String.class,String.class);
        Object ret = loginMethod.invoke(obj, "admin", "admin123");
        System.out.println(ret);
    }
}
